package com.buaa.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.time.LocalDateTime;


@Data
//可以使用 @TableName 表名注解指定当前实体类对应的表名，比如下面 User 实体类对应表名为 sys_user
@TableName(value="police_user_activity")
public class UserActivity {
    //可以使用 @TableId 注解（标注在主键上）和 @TableField 注解（标注在其他成员属性上）来指定对应的字段名
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

    @TableField(value = "uid")
    private Integer uid;


    @TableField(value = "police_id")
    private String policeId;

    @TableField(value = "salt")
    private String salt;

    //userName 字段与数据库表字段 user_name 进行映射
    @TableField(value = "user_name")
    private String userName;

    @TableField(value = "user_password")
    private String userPassword;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "create_time")
    private LocalDateTime createTime;
    @TableField(value = "create_by")
    private String createBy;
    @TableField(value = "lock_status")
    private Integer lockStatus;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "revision_time")
    private LocalDateTime revisionTime;

    @TableField(value = "reviser")
    private String reviser;

    @TableField(value = "operation_type")
    private String operationType;

}
